<!doctype html>
<html lang="en">

<head>
	<title>Home</title>
	{%include file="public/head_common" /%}
	<!-- Pager CSS -->
<link rel="stylesheet" href="__STATIC__/assets/vendor/jquery-pager/Pager.css">
<style type="text/css">
	table label{
		font-weight: bold;
		/*padding-right: 20px;*/
	}
	table span{
		margin-right:50px;
	}
	.pop{
		position: absolute;
		width: 300px;
		padding: 8px;
		background: #eee;
		box-shadow: 5px 5px 5px #888888;
		display: none;
	}
	.pop ul{
		list-style: none;
		overflow: hidden;
		padding: 0px;
	}
	.pop ul li{
		float: left;
		padding: 5px;
	}
	.pop ul li:hover{
		cursor: pointer;
		color: #00aaff
	}

	.table > tbody > tr > td{
		border-top:0px;
	}
	.table > tbody + tbody {
    	border-top: 1px solid #ddd;
	}
</style>
</head>

<body>
	<!-- MAIN -->
	<div class="main">
		<!-- MAIN CONTENT -->
		<div class="main-content" id="app">
			
			<div class="container-fluid">
				
				<div class="panel panel-default">
					<h3>最近一周发货统计</h3>
					<div id="result">
						<table class="table table-hover table-condensed">
							<thead>
								<tr>
									<th>日期</th>
									<th>快递单数</th>
									<th>货物数量</th>
									
								</tr>
							</thead>
							<tbody>
								<tr v-for="row in rows">
									
									
									<td>{{row.day}}</td>
									<td>{{row.express_count}}</td>
									<td>{{row.goods_count}}</td>
									
								</tr>
							</tbody>
						</table>
						
					</div>
				</div>
				<div>
					<a href="{%:url('Orders/oiList')%}" target="_BLANK">订单明细</a>
				</div>		
			</div>
		</div>
		<!-- END MAIN CONTENT -->
	</div>

	<!-- END MAIN -->
	<div class="clearfix"></div>
	<!-- FOOTER -->

		<!-- END FOOTER -->

	<!-- END WRAPPER -->


	<!-- Javascript -->
	<script src="__STATIC__/assets/vendor/jquery/jquery.min.js"></script>
	<script src="__STATIC__/assets/vendor/bootstrap/js/bootstrap.min.js"></script>
	
	<script src="__STATIC__/assets/vendor/My97DatePicker/WdatePicker.js"></script>
	<script src="__STATIC__/assets/vendor/vue.js" type="text/javascript"></script>

	<script type="text/javascript">
		
		var vm = new Vue({
			el: '#app',
			data: {
				rows: [],

			},
			created: function(){
				this.getList();
				//console.log(this.rows);
			},
			methods:{
				getList: function(){

					
					var _this = this;

					$.ajax({
			            url: "{%:url('Deliver_goods/weekStatistics')%}",
			            type:'POST',
			            dataType: 'json',
			            success:function(rsp){
			                _this.rows = rsp.data.rows;
			                
			            }
			        });
					
				},
				
			}
		});
		
	</script>
</body>

</html>